import request from '@/utils/request';
// 紧急救援列表
export async function callForHelpList(params) {
  const res = await request.get('/massage/emergencyRescue/page', { params });
  if (res.data.code === 200) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
// 紧急救援列变更接口
export async function callForHelpModify(data) {
  const res = await request.put('/massage/emergencyRescue', data);
  console.log(res);
  if (res.data.code === 200) {
    return res.data.message;
  }
  return Promise.reject(new Error(res.data.message));
}
export async function callForHelpDelete(id) {
  const res = await request.delete('/massage/emergencyRescue/' + id);
  console.log(res);
  if (res.data.code === 200) {
    return res.data.message;
  }
  return Promise.reject(new Error(res.data.message));
}
